#include "stdafx.h"
#include "PlayerStatus.h"

CPlayerStatus::CPlayerStatus()
{

}

CPlayerStatus::~CPlayerStatus()
{

}

bool CPlayerStatus::setStatus(Status status)
{
	mCurrentStatus = status;
	auto item = mActions.find(status);
	if (item == mActions.end())
	{
		mActions[mCurrentStatus] = createActionInstance(status);
	}
	mActions[mCurrentStatus]->execute();
	return true;
}

CActionInstance* CPlayerStatus::createActionInstance(Status status)
{
	return nullptr;
}
